package com.uppalz.fundmanager.entities;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Zafar
 */
@Entity
public class FundMember implements Serializable {

    @Id
    private String email;
    //
    private String name;
    //
    private String contactNumber;
    //
    @Temporal(TemporalType.DATE)
    private Date joiningDate;
    //
    @Temporal(TemporalType.DATE)
    private Date leavingDate;

    public FundMember() {
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getContactNumber() {
        return contactNumber;
    }

    public void setContactNumber(String contactNumber) {
        this.contactNumber = contactNumber;
    }

    public Date getJoiningDate() {
        return joiningDate;
    }

    public void setJoiningDate(Date joiningDate) {
        this.joiningDate = joiningDate;
    }

    public Date getLeavingDate() {
        return leavingDate;
    }

    public void setLeavingDate(Date leavingDate) {
        this.leavingDate = leavingDate;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (email != null ? email.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        if (!(object instanceof FundMember)) {
            return false;
        }
        FundMember other = (FundMember) object;
        if ((this.email == null && other.email != null)
                || (this.email != null && !this.email.equals(other.email))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.uppalz.fundmanager.entities.FundMember[ email=" + email + " ]";
    }

}
